package com.hbfec.mqttmanager.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
@ConfigurationProperties(prefix = "mqtt")
@Component
public class MqttProperties {

    private String url;
    private String client;
    private String username;
    private String password;
    private List<String> topics;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getClient() {
        return client;
    }

    public void setClient(String client) {
        this.client = client;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<String> getTopics() {
        return topics;
    }

    public void setTopics(List<String> topics) {
        this.topics = topics;
    }

    @Override
    public String toString() {
        return "MqttSetting [url=" + url + ", client=" + client + ", username=" + username + ", password="
                + password + ", topics="+ topics.toString() + "]";
    }
}
